package com.woniuxy.yuekeuser.service.impl;

import com.woniuxy.yuekeuser.model.CampsiteActivity;
import com.woniuxy.yuekeuser.dao.CampsiteActivityMapper;
import com.woniuxy.yuekeuser.model.CampsiteActivityPicture;
import com.woniuxy.yuekeuser.service.ICampsiteActivityService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Freedom
 * @since 2020-11-03
 */
@Service
public class CampsiteActivityServiceImpl extends ServiceImpl<CampsiteActivityMapper, CampsiteActivity> implements ICampsiteActivityService {
@Autowired
private CampsiteActivityMapper campsiteActivityMapper;
    @Override
    public void addCampsiteActivity(CampsiteActivity campsiteActivity) {
         campsiteActivityMapper.addCampsiteActivity(campsiteActivity);
    }

    @Override
    public void addcampsiteActivityPicture(CampsiteActivityPicture campsiteActivityPicture) {
        campsiteActivityMapper.addcampsiteActivityPicture(campsiteActivityPicture);
    }

    @Override
    public List<CampsiteActivity> findActivitys(String campsiteName,int index, int pageSize) {
        return campsiteActivityMapper.findActivitys(campsiteName, index, pageSize);
    }

    @Override
    public int findActivityCount(String campsiteName) {
        return campsiteActivityMapper.findActivityCount(campsiteName);
    }

    @Override
    public List<CampsiteActivityPicture> findActivityImagesByActivityId(int id) {
        return campsiteActivityMapper.findActivityImagesByActivityId(id);
    }

    @Override
    public String findImageByActivityId(int id) {
        return campsiteActivityMapper.findImageByActivityId(id);
    }
}
